package com.shanzhu.volunteer.interfaces.vo.volunteer.comment;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.shanzhu.volunteer.modules.volunteer.entity.model.CampusFileEntity;
import lombok.Data;

import java.util.List;

/**
 *
 */
@Data
public class CampusFileVo {

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 文章id
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long contentId;

    private List<String> fileUrls;

    private List<FileVo> files;

    public CampusFileVo() {
    }

    public CampusFileVo(Long contentId, List<String> fileUrls) {
        this.contentId = contentId;
        this.fileUrls = fileUrls;
    }
    public CampusFileVo(CampusFileEntity campusFileEntity) {
        this.contentId = campusFileEntity.getContentId();
        this.fileUrls = campusFileEntity.getFileUrls();
    }

    public CampusFileVo(Long contentId, List<String> fileUrls, List<FileVo> files) {
        this.contentId = contentId;
        this.fileUrls = fileUrls;
        this.files = files;
    }
}